#!/usr/bin/env bash

## 更新CcUser字段 userId更改为id 添加property属性 设置老用户的批阅人为所有上级主管
curl http://pt2jobs.xbongbong.com.cn/pro/v1/script/workReport/fixCcUserField -X POST -H 'Content-type: application/json' -d '{"corpid":"dingf6576c4f7359fd1f","userId":"manager7218","corpidList":[],"platform":"web","frontDev":"1","xbbCode":"123456"}'

# 批阅人的默认值和字段类型隐藏 日报
curl http://127.0.0.1:2019/pro/v1/script/field/initNewAll -X POST -H 'Content-type: application/json' -d '{"corpid":"dingf6576c4f7359fd1f","userId":"manager7218","corpidList":[],"platform":"web","frontDev":"1","xbbCode":"123456","attr":"text_2","businessType":2102,"initMethod":"approvedPeople","initMethodField":"forbiddenSettingList","operate":1}'
curl http://127.0.0.1:2019/pro/v1/script/field/initNewAll -X POST -H 'Content-type: application/json' -d '{"corpid":"dingf6576c4f7359fd1f","userId":"manager7218","corpidList":[],"platform":"web","frontDev":"1","xbbCode":"123456","attr":"text_2","businessType":2102,"initMethod":"approvedPeople","initMethodField":"memo","operate":1}'
# 批阅人的默认值和字段类型隐藏 周报
curl http://127.0.0.1:2019/pro/v1/script/field/initNewAll -X POST -H 'Content-type: application/json' -d '{"corpid":"dingf6576c4f7359fd1f","userId":"manager7218","corpidList":[],"platform":"web","frontDev":"1","xbbCode":"123456","attr":"text_2","businessType":2103,"initMethod":"approvedPeople","initMethodField":"forbiddenSettingList","operate":1}'
curl http://127.0.0.1:2019/pro/v1/script/field/initNewAll -X POST -H 'Content-type: application/json' -d '{"corpid":"dingf6576c4f7359fd1f","userId":"manager7218","corpidList":[],"platform":"web","frontDev":"1","xbbCode":"123456","attr":"text_2","businessType":2103,"initMethod":"approvedPeople","initMethodField":"memo","operate":1}'
# 批阅人的默认值和字段类型隐藏 月报
curl http://127.0.0.1:2019/pro/v1/script/field/initNewAll -X POST -H 'Content-type: application/json' -d '{"corpid":"dingf6576c4f7359fd1f","userId":"manager7218","corpidList":[],"platform":"web","frontDev":"1","xbbCode":"123456","attr":"text_2","businessType":2104,"initMethod":"approvedPeople","initMethodField":"forbiddenSettingList","operate":1}'
curl http://127.0.0.1:2019/pro/v1/script/field/initNewAll -X POST -H 'Content-type: application/json' -d '{"corpid":"dingf6576c4f7359fd1f","userId":"manager7218","corpidList":[],"platform":"web","frontDev":"1","xbbCode":"123456","attr":"text_2","businessType":2104,"initMethod":"approvedPeople","initMethodField":"memo","operate":1}'

# 抄送人的默认值和字段类型隐藏 日报
curl http://127.0.0.1:2019/pro/v1/script/field/initNewAll -X POST -H 'Content-type: application/json' -d '{"corpid":"dingf6576c4f7359fd1f","userId":"manager7218","corpidList":[],"platform":"web","frontDev":"1","xbbCode":"123456","attr":"array_1","businessType":2102,"initMethod":"cc","initMethodField":"forbiddenSettingList","operate":1}'
# 抄送人的默认值和字段类型隐藏 周报
curl http://127.0.0.1:2019/pro/v1/script/field/initNewAll -X POST -H 'Content-type: application/json' -d '{"corpid":"dingf6576c4f7359fd1f","userId":"manager7218","corpidList":[],"platform":"web","frontDev":"1","xbbCode":"123456","attr":"array_1","businessType":2103,"initMethod":"cc","initMethodField":"forbiddenSettingList","operate":1}'
# 抄送人的默认值和字段类型隐藏 月报
curl http://127.0.0.1:2019/pro/v1/script/field/initNewAll -X POST -H 'Content-type: application/json' -d '{"corpid":"dingf6576c4f7359fd1f","userId":"manager7218","corpidList":[],"platform":"web","frontDev":"1","xbbCode":"123456","attr":"array_1","businessType":2104,"initMethod":"cc","initMethodField":"forbiddenSettingList","operate":1}'
# 批阅人所有直属上级改成所有上级主管
curl http://127.0.0.1:2019/pro/v1/script/field/initNewAll -X POST -H 'Content-type: application/json' -d '{"corpid":"dingf6576c4f7359fd1f","userId":"manager7218","corpidList":[],"platform":"web","frontDev":"1","xbbCode":"123456","attr":"text_2","businessType":2102,"initMethod":"approvedPeople","initMethodField":"defaultAttr","operate":1}'
curl http://127.0.0.1:2019/pro/v1/script/field/initNewAll -X POST -H 'Content-type: application/json' -d '{"corpid":"dingf6576c4f7359fd1f","userId":"manager7218","corpidList":[],"platform":"web","frontDev":"1","xbbCode":"123456","attr":"text_2","businessType":2103,"initMethod":"approvedPeople","initMethodField":"defaultAttr","operate":1}'
curl http://127.0.0.1:2019/pro/v1/script/field/initNewAll -X POST -H 'Content-type: application/json' -d '{"corpid":"dingf6576c4f7359fd1f","userId":"manager7218","corpidList":[],"platform":"web","frontDev":"1","xbbCode":"123456","attr":"text_2","businessType":2104,"initMethod":"approvedPeople","initMethodField":"defaultAttr","operate":1}'

# 线上公司工单默认模板(售后)刷默认打印模板
curl http://pt2jobs.xbongbong.com.cn/pro/v1/script/print/addDefaultPrintTemplate -X POST -H 'Content-type: application/json' -d '{"corpid":"1","userId":"1","platform":"web","frontDev":"1","xbbCode":"123456"}'
